<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<link rel="stylesheet" type="text/css" href="default.css">
<title>The errors.ini file</title>
</head>
<body>
<h2>The errors.ini file</h2>
In addition to retrieving system and module error messages, ERRLOOK can also display custom error messages from an ini file. The file must be named errors.ini and be located in the same folder as the program. 
<p>The file should have one section for each category of error messages. Each item within a section should have the error value to the left, an equal sign and the error text to the right of the equal sign. Each error record must be on a single line(i.e no line breaks). 
<h4>Example:</h4>
<pre>
[DOS Extended Error]
0x01=function number invalid
$01=function number invalid
1=function number invalid
</pre>  
<p>Note that in contrast to the lookup for system and module errors, the search in errors.ini is done on the <i>exact</i> value entered into the value edit field: entering the value "1" would find the third item in the list above, but not the first or second. To find the first item, you should enter the value "0x01" and to find the second item, you should enter the value "$1". All values should be entered without quotes.
<p>Because of the way that ERRLOOK searches errors.ini, you should include one definition of each error message in every format you think will be used. You can also include defined constants in the list. For example, you could expand the above list to look like the list below to be able to find the error message for the defined constant <code>ERROR_INVALID_FUNCTION</code>:

<pre>
[DOS Extended Error]
0x01=function number invalid
$01=function number invalid
1=function number invalid
ERROR_INVALID_FUNCTION=function number invalid
</pre>  
   
<p>When an item from the errors.ini list has been found, the category name is displayed as the header for the error message.
<p>The system and module errors also have headers. A system error has the header "Windows Error". A module error has the filename of the module as the header.
<p>Note that if several categories contain the same error code value, they will all be displayed in the message window, each preceeded by their category header.
</body>
</html>
